<script src="js/jquery.nyroModal-1.2.8.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="themes/${theme}/project.css" />
<link type="text/css" rel="stylesheet" href="themes/${theme}/forms.css" />
<script>
$(document).ready(function(){
	$("#new_resource").mouseover(function(){
		$(this).css("cursor","pointer");
	});
        $("#sel_project").click(function() {
                if ($("#project").val() == -1 || $("#project").val() == 0) {
                        alert("${err_select}");
                } else {
			$.ajax({
				type: "post",
				url: "resources.php",
				cache: "false",
				data: "&project="+$("#project").val(),
				success: function(html) {
					$("#content").empty();
					$("#content").append(html);
				}
			});
                }
        }).mouseover(function(){
                $(this).css("cursor","pointer");
        })

})
</script>
<div id="content">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
                <td class="toolbar" height="30" align="center">
                <table width="99%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                        <td width="60" align="right">${prj_title}:&nbsp;</td>
                        <td width="180">
                        <select  class="form_input" id="project">
                        <option tal:repeat="prj projects" value='${prj/id_project}' tal:attributes="selected prj/selected">${prj/name}</option>
                        </select>
                        </td>
                        <td><input type="submit" id="sel_project" name="sel_project" class="bt_blue" Value="${bt_select}" /></td>
                </tr>
                </table>
                </td>
        </tr>
</table>
<br />
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="project_table" align="center">
<tr>
<td>
	<table width="100%" border="0" cellpadding="1" cellspacing="1">
	<tr>
		<td colspan="8" class="project_title">
			<table width='100%' border='0' cellpadding='0' cellspacing='0'>
			<tr>
				<td align='center' class="project_title">${title}</td>
				<td width='79'>
					<a href="resource_add.php?&project=${id}" class="nyroModal">
					<input id="new_resource" type="submit" class="bt_blue" value="${bt_new}" />
					</a>
				</td>
			</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td width="20" class="project_subtitle">D</td>
		<td width="20" class="project_subtitle">M</td>
		<td class="project_subtitle">${role}</td>
		<td class="project_subtitle">${name}</td>
		<td class="project_subtitle">${alias}</td>
		<td class="project_subtitle">${email}</td>
	</tr>
	<tr>
		<td colspan='5' class='item' align='center' height='20' tal:content="message" tal:condition="msg">message</td>
	</tr>
	<tr tal:repeat="member members" class="${member/class}" ta:condition="not: msg">
		<td align="center"><img src='themes/${theme}/images/ico_delete.jpg' border='0' /></td>
		<td align="center"><img src='themes/${theme}/images/ico_modify.gif' border='0' /></td>
		<td tal:content="member/role" />
		<td tal:content="member/name"  />
		<td tal:content="member/alias" />
		<td tal:content="member/email" />
	</tr>
	</table>
</td>
</tr>
</table>
</div>
